package by.qizer.supercamp.service;

import by.qizer.supercamp.dao.JournalDAO;
import by.qizer.supercamp.domain.Inside;
import by.qizer.supercamp.domain.Journal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Pribytkoyski Alexey
 *         User: qizer
 *         Date: 08.04.12
 */
@Service
public class JournalServiceImpl implements JournalService {

    @Autowired
    private JournalDAO journalDAO;

    @Transactional
    public void addJournal(Inside inside) {
        journalDAO.addJournal(inside);
    }

    @Transactional
    public List<Journal> listJournal() {
        return journalDAO.listJournal();
    }

    @Transactional
    public void removeJournal(Integer id) {
        journalDAO.removeJournal(id);
    }
}
